package com.qf.service.impl;

import com.qf.dao.SetMealAdd;
import com.qf.dao.SetMealDelete;
import com.qf.entity.SetMeal;
import com.qf.service.SetMealAddService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Transactional(rollbackFor=Exception.class)
@Service
public class SetMealAddServiceimpl implements SetMealAddService {
    @Autowired
    private SetMealAdd setMealAdd;

    @Override
    public void setMealAdd(Integer[] id,SetMeal setMeal) {
        setMealAdd.modify(setMeal);
        String code = setMeal.getCode();
        Integer uid = setMealAdd.chaxun(code);
        setMealAdd.update(id,uid);
    }
}
